<?php
if(!empty($_POST))
{
	
	$id = $_POST['Id'];
	$result = update('newscate', $_POST, $id);
	if($result)
	{
		echo '更新成功';
		header('Refresh:1;index.php?a=admin&b=newscate&c=index');
		die;
	}else
	{
		echo '更新失败';
		header('Refresh:1;index.php?a=admin&b=newscate&c=index');
		die;	
	}
}
$cate = selectAll('newscate');
$id = $_GET['id'];
$re = selectone('newscate','Id='.$id);

include('app/admin/newscate/html/update.html');
?>